using Newtonsoft.Json;
using NExt.Core.Model.Base;

namespace NExt.Serialization.JsonNet.Conversion
{
    public class ScriptConverter : AbstractJsonConvertor<IScript>
    {
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            IScript function = (IScript)value;
            writer.WriteRawValue(function.text);
        }
    }
}